<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    
    <title>et</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="Charisma, a fully featured, responsive, HTML5, Bootstrap admin template.">
    <meta name="author" content="Muhammad Usman">
<%@include file="/commons/commonJs.jsp"%>

<script type="text/javascript">

function showUser(data,divId){
	$("#"+divId).modal();
	$("#userName").val(data.userName);
	$("#passWord").val(data.passWord);
	$("#id").val(data.id);
}


</script>
</head>

<body>

            <!-- content starts -->
                <div>
        <ul class="breadcrumb">
            <li>
                <a href="javascript:skipPage('<%=basePath%>mgt/login/content.do')">主页</a>
            </li>
            <li>
                <a href="#">教师管理</a>
            </li>
        </ul>
    </div>


<form id="splitPage"  action="${pageContext.request.contextPath }/mgt/teach/teachList.do" method="POST">
<div class="row">
        <div class="box col-md-12">
            <div class="box-inner">
                <div class="box-header well" data-original-title="">
                    <h2>教师查询</h2>

                    <div class="box-icon">
                        <a href="#" class="btn btn-setting btn-round btn-default"><i
                                class="glyphicon glyphicon-cog"></i></a>
                        <a href="#" class="btn btn-minimize btn-round btn-default"><i
                                class="glyphicon glyphicon-chevron-up"></i></a>
                        <a href="#" class="btn btn-close btn-round btn-default"><i
                                class="glyphicon glyphicon-remove"></i></a>
                    </div>
                </div>
                <div class="box-content">
                    <fieldset>
                    <div class="form-group col-md-4">
                    <label class="control-label" for="">教师名称</label>
                    <input type="text" class="form-control" name="userName" value="${user.userName }" id="">
                </div>
                <div class="form-group col-md-4">
                    <label class="control-label" for="">教师信息</label>
                    <input type="text" class="form-control" name="passWord" value="${user.passWord }" id="">
                </div>
				  	
					
				  	<div class="form-group col-md-4">
						<label class="control-label">教师id</label>
					  	<input class="form-control" type="text" name="id" value="${user.id }" readonly="readonly" >
				  	</div>
					
				  	<div class="form-group">
						<button type="button" class="btn btn-primary" onclick='queryList("content", "splitPage");'>查询</button>
						<button type="reset" class="btn">重置</button>
				  	</div>
				</fieldset>
                    
                </div>
            </div>
        </div>
    </div><!--/span-->



    <div class="row">
    <div class="box col-md-12">
    <div class="box-inner">
    <div class="box-header well" data-original-title="">
        <h2><i class="glyphicon glyphicon-user"></i> 教师列表</h2>
		<a class="btn btn-round btn-primary" href="javascript:skipPage('<%=basePath%>mgt/teach/toTeachSave.do')" style="font-size:10px;float:right">
        		<i class="glyphicon glyphicon-edit icon-white"></i>新增</a>
        <!-- <div class="box-icon">
            <a href="#" class="btn btn-setting btn-round btn-default"><i class="glyphicon glyphicon-cog"></i></a>
            <a href="#" class="btn btn-minimize btn-round btn-default"><i
                    class="glyphicon glyphicon-chevron-up"></i></a>
            <a href="#" class="btn btn-close btn-round btn-default"><i class="glyphicon glyphicon-remove"></i></a>
        </div> -->
    </div>
    <div class="box-content">
    <table class="table table-bordered table-striped table-condensed">
    <thead>
    <tr>
        <th onclick="orderbyFun('th_id','content', 'splitPage', 'id')">id<span id="th_id"></span></th>
        <th>教师名称</th>
        <th>教师信息</th>
        <th>Status</th>
        <th>Actions</th>
    </tr>
    </thead>
    <tbody>
    <c:forEach items="${pager.list }" var="item">  
	<c:if test="${!empty item }">
    	<tr>
        <td>${item.id }</td>
        <td class="center">${item.userName }</td>
        <td class="center">${item.passWord }</td>
        <td class="center">
            <span class="label-success label label-default">Active</span>
        </td>
        <td class="center">
            <a class="btn btn-success" href="javascript:ajaxDiv(false, 'userShow', '<%=basePath%>mgt/teach/toTeachShow.do', '{id:${item.id }}', showUser)" style="font-size:10px">
                <i class="glyphicon glyphicon-zoom-in icon-white"></i>
                View
            </a>
            <a class="btn btn-info" href="javascript:skipPage('<%=basePath%>mgt/teach/toTeachUpdate.do','{id:${item.id }}')" style="font-size:10px">
                <i class="glyphicon glyphicon-edit icon-white"></i>
                Edit
            </a>
            <a class="btn btn-danger" href="javascript:skipPage('<%=basePath%>mgt/teach/teachDelete.do','{id:${item.id }}')" style="font-size:10px">
                <i class="glyphicon glyphicon-trash icon-white"></i>
                Delete
            </a>
        </td>
    	</tr>
    </c:if>
    </c:forEach>
    </tbody>
    </table>
    
    <div id="splitPageDiv" ></div>
	<%@include file="/commons/splitPage.jsp"%>
    
    </div>
    </div>
    </div>
    <!--/span-->

    </div><!--/row-->

</form>
















	<div class="modal fade" id="userShow" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
         aria-hidden="true">

        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal">×</button>
                    <h3>教师信息</h3>
                </div>
                <div class="modal-body">
                	<fieldset>
                    <div class="form-group col-md-12">
                    <label class="control-label" for="userName">教师名称</label>
                    <input type="text" class="form-control" name="userName" value="" id="userName">
                </div>
                <div class="form-group col-md-12">
                    <label class="control-label" for="passWord">教师信息</label>
                    <input type="text" class="form-control" name="passWord" value="" id="passWord">
                </div>
				  	
				  	<div class="form-group col-md-12">
						<label class="control-label" for="id">教师id</label>
					  	<input class="form-control" type="text" name="id" id="id" value="" readonly="readonly" >
				  	</div>
				</fieldset>  
                </div>
                <div class="modal-footer">
                    <a href="#" class="btn btn-primary" data-dismiss="modal">Close</a>
                    <!-- <a href="#" class="btn btn-primary" data-dismiss="modal">Save changes</a> -->
                </div>
            </div>
        </div>
    </div>
    
    
    
    
    
    
    
    <!-- content ends -->


</body>
</html>
